Database replication technology involves propagating changes made to one database to other databases. A common replication configuration involves a single primary database to which changes are made, and multiple standby databases to which those changes are propagated. While write operations are generally only performed on the primary database, read operations may be performed both on the primary database and any of the standby databases.
Such one-to-many replication configurations are useful to scale-out beyond the capacity of a single database for read-heavy workloads. Traditionally, in such a configuration, the propagation of changes follows a single-sender/multiple-receiver approach, as illustrated in FIG. 1. Specifically, a sender (the database server managing the primary database) transfers the changes via a dedicated network connection to each receiver (the database servers managing the standby databases).
Unfortunately, the single-sender/multiple-receiver approach to propagating changes has several disadvantages. For example, bandwidth is constrained and typically becomes a bottleneck at the sender. In addition, a single sender opening multiple connections to multiple destinations can lead to extreme CPU load on the sender. Further, receivers may observe high latency due to the limited bandwidth and high load incurred by the sender. Because the limitations of the single-sender/multiple-receiver configuration are exacerbated as new receivers are added to the system, the single-sender/multiple-receiver approach is not scalable.
To address some of the problems of the single-sender/multiple-receiver approach, a “cascading configuration” approach has been developed, as illustrated in FIG. 2. In the cascading configuration approach, the primary database is established as the root of a tree-like topology, where each database (starting with the primary database) transmits changes to a fixed number of cascaded destinations. Those cascaded destinations, in turn, transmit the changes to their cascaded destinations, as specified by the tree-like topology. Unfortunately, the cascading configuration approach has the problem of complexity in configuration, as well as limited scalability.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.